<div class="box round first">
<?php 	if (isset($_GET['id_topic'])):?>
<?php 	$id_topic = $_GET['id_topic']?>
<?php 	$topic = $this->getTopic ($id_topic)?>
<?php 	if (isset($topic['id_topic'])):?>
<?php 	$pagers = $this->getAllPagerOfTopic ($id_topic);?>
	<h2><?php echo $topic['name'];?>
	</h2>
	
</div>
<a class="btn btn-blue" href="<?php echo Epic::getUrl('admin/topic/addPager');?>">Add pager</a>
<div class="box round first grid">
<h2>Tables & Grids</h2>
<div class="block">
<table class="data display datatable" id="example">
	<thead>
		<tr>
		<th>ID</th>
		<th>Name</th>
		<th>Volume - Isue</th>
		<th>Pagers</th>
		<th>Tool</th>
		</tr>
	</thead>
		<tbody>
		<?php if ($pagers !=null):?>
		<?php foreach ($pagers as $pager):?>
			<tr class="odd gradeX">
				<td><?php echo $pager['id_pager']?></td>
				<td><?php echo $pager['name']?></td>
				<td><?php echo "Volume ".$pager['volume']."- Issue ".$pager['issue']?></td>
				<td><?php echo $pager['page_start']."-".$pager['page_end']?></td>
				<td>
					<a class="btn-mini btn-black btn-refresh" href="<?php echo Epic::getUrl('admin/topic/viewPager',array('id_topic'=>$topic['id_topic']))?>"><span></span>View</a>
					<a class="btn-mini btn-black btn-minus"><span></span>Remove</a>
				</td>
			</tr>
		<?php endforeach;?>
		<?php endif;?>
		</tbody>
	</table>
	</div>

<?php else:?>
	<span style="color: blue;">Journal does not exist</span>
<?php endif;?>
<?php else:?>
	<span style="color: blue;">Journal does not exist</span>
<?php endif;?>
</div>